#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
void reverse(int* arr, int left, int right)
{

	int temp = 0;
	while (left < right)
	{
		temp = *(arr+left);
		*(arr+left) = *(arr+right);
		*(arr+right) = temp;
		left++;
		right--;

	}
}
void Print(int* arr,int x)
{
	int i = 0;
	for (i = 0; i < x; i++)
	{
		printf("%d ", arr[i]);
	}
	printf("\n");
}
int main()
{
	int arr1[] = { 1,2,3,4,5,6 };
	int sz = sizeof(arr1) / sizeof(arr1[0]);
	Print(arr1,sz);
	reverse(arr1, 0, sizeof(arr1) /sizeof( arr1[0])-1);
	Print(arr1,sz);
	return 0;
}